package manage.controller;

import manage.domain.Student;
import manage.service.StudentService;

import java.util.Scanner;


public class StudentController extends BaseStudentController {

    //录入学生信息方法（将多次使用的用户输入封装起来，减少代码量）
    @Override//注解  检查重写是否存在错误
    public Student inputStuInfo(String id) {
        System.out.println("请输入姓名：");
        String name = sc.next();
        System.out.println("请输入年龄：");
        String age = sc.next();
        System.out.println("请输入生日：");
        String birthday = sc.next();
        Student stu = new Student();
        stu.setId(id);
        stu.setAge(age);
        stu.setName(name);
        stu.setBirthday(birthday);
        return stu;
    }
}
